import { cache_clear, cache_del, cache_init, cache_save } from "./cache";

import { } from "./capture"
import { } from "./infoQueue"
import { infoStorage } from "./infoStorage"
import { request_fetch } from "./request"
import { utils_deep_copy } from "./utils"

var version = "1.1.3";


interface IConfig {

}


/**
 * [logInit description]
 * @param {IConfig} config 配置项
 */
function logInit(config: IConfig) {

}

/**
 * [duration_log description]
 * @param {Function} callBack 回调函数
 * @param {number} time     时间 秒
 */
function duration_log(callBack, time) {
    var duration = 0;
    var t = null;
    if (!t) {
        var t = setInterval(function () {
            duration += time;
            callBack(infoStorage.terminal_info, duration);
        }, time * 1000);
        callBack(t, duration);
    }
}

export var Log: object = {
    version: version,
    cache: {
        init: cache_init,
        save: cache_save,
        clear: cache_clear,
        del: cache_del
    }
}